package com.sxt.service.impl;
import com.sxt.domain.User;
import com.sxt.mapper.UserMapper;
import com.sxt.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional  //所有方法全部参与事务
//@Transactional(propagation = Propagation.REQUIRED)
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;//
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return 0;
    }

    @Override
    public int insert(User user) {
        return 0;
    }
    @Transactional(readOnly = true)
    @Override
    public User selectByPrimaryKey(Integer id) {
        return null;
    }
    @Override
    public int updateByPrimaryKey(User user) {
        return 0;
    }
    @Override
    public List<User> queryAllUser() {
        return null;
    }
}
